package model;

import java.io.FileOutputStream;

public class MapWriter {

	
	byte[] mapData;
	public MapWriter() {
		
	}
	
	public void writeTestMap50() {
		
		int fullMapSize = 50*50;
		mapData = new byte[fullMapSize + 4];
		mapData[0] = 50;
		mapData[1] = 1;
		mapData[2] = 50;
		mapData[3] = 1;
		
		for (int i = 0; i < fullMapSize; i++) {
			mapData[i + 4] = 1;
		}
		
		writeMapData("data/maps/TestMap50.wcf");
		
	}
	
	public void writeMapData(String fileName) {
		try {
			FileOutputStream fos = new FileOutputStream(fileName);
			fos.write(mapData);
		} catch (Exception e) {
			System.out.println(e.getMessage());
		}
	}
		
}
